<html>
<head><meta charset="utf-8"><title>On WinXP support · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html">On WinXP support</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214487285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214487285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214487285">(Oct 25 2020 at 12:33)</a>:</h4>
<p>Currently the Tier 1 Windows targets are. as far as I'm aware. the only Tier 1 platforms that are also Tier 3 platforms. That is they support Windows 7+ as Tier 1 (well only Windows 10 is actually tested automatically) and Windows XP as Tier 3. I don't think this is a good situation.</p>
<p>This has been brought up many times before but I was wondering if there could be some broad consensus on which general direction to take to address this issue before getting into the specifics yet again? With that in mind, I'll try to describe where things stand today. But first some history.</p>
<p>Windows XP support was added by Firefox because they needed it at the time. However from 2017 Firefox dropped support for XP. This mostly left Rust's XP support to rot. There are sporadic patches to fix one issue or another but there's no longer any group with a sustained interest in supporting XP.</p>
<p>Currently you cannot actually compile for Windows XP without jumping through some hoops (e.g. using the right link args, selecting the XP import libraries, etc). The std is also fraught with landmines for XP. Even panics were broken for the longest time (maybe they still are). There's also a security issue with <a href="https://github.com/rust-lang/rust/blob/e3051d8c24467b54c81da9d9ad70a3e82e106ec1/library/std/src/sys/windows/pipe.rs#L93">pipes</a> on XP but it hasn't been fixed because it would "introduce significant amount of Windows XP specific code with no clean testing strategy".</p>
<p>On the flip side it means that code for Windows circa 2009+ still has to use a runtime <a href="https://github.com/rust-lang/rust/blob/e3051d8c24467b54c81da9d9ad70a3e82e106ec1/library/std/src/sys/windows/compat.rs#L1">compatibility layer</a> and can be littered with workarounds or else uses older APIs (which may or may not be an issue, depending on how those APIs are implemented and what features they expose). It's also been mentioned that analysis is made more difficult with the presence of the runtime compatibility layer (though I'm not sure of the details there).</p>
<p>In short, the jump from XP to Vista (and even more so from XP to 7) included some big architectural changes under the hood, which is reflected in a lot of new or enhanced APIs that Rust relies on. Therefore I think that trying to support two very different platforms in one target, with no compile time way to distinguish them, hurts support for both platforms. Especially as one of those targets has no automated testing and relatively few people interested in contributing more than sporadically.</p>
<hr>
<p>Possible solutions include:</p>
<ul>
<li>Drop support for XP completely. The original motivation for supporting XP came from Firefox but they have long since stopped supporting it. Nowadays the people who want XP support are few in number and there are even fewer who contribute fixes. It would still be possible to compile Rust programs for XP (minus the standard library) but it wouldn't be officially supported.</li>
<li>Drop the standard library's support for XP. This would keep XP as an official Tier 3 target so long as LLVM supports XP but the standard library would be under no obligation to support it.</li>
<li>Add a new target triple for XP. This could set the right linker args, try to find the right import libraries and the std can use it to explicitly target XP compatibility (or not). So can third-party crates.</li>
<li>Add some kind of "platform version" <code>cfg</code> option. The std and crates can then target code for XP at compile time. This <code>cfg</code> option may also be of use to platforms outside of Windows, e.g. Android.</li>
<li>The status quo. </li>
</ul>
<p>Note that there's no practical difference between the first two solutions other than a policy statement and they only differ from the status quo in that they free up the Windows standard library from needing runtime compatibility shims and workarounds.</p>



<a name="214488122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214488122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Philipp Korber <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214488122">(Oct 25 2020 at 12:52)</a>:</h4>
<p>(Ignoring the part about weather or not to drop Xp completely.)</p>
<p>IMHO XP, Win7 and Win10 are fundamentally different operating systems which just happens to have a lot of interoperability , similar to how many BSD's &amp; Linux have a lot of interoperability (ok it's a bit stricter). Similar to the win compatibility layer some bsd's have/had a Linux compatibility layer.</p>
<p>So I believe there should be different target triples.</p>
<p>The only problem is that there are some "in-between" versions, like Vista or Win8. And I'm not sure if they should get their own triplets... I mean there is a clear cut between XP and Vista. So they should not be in the same triplet. Also  Vista and  Win10 are so different that they probably also should not be in the same triplet IMHO. Especially given that Win10 is (discussable) a "ever green" operating system. But to which triplet does Win8 belong?</p>



<a name="214488679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214488679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214488679">(Oct 25 2020 at 13:05)</a>:</h4>
<p>Vista has never officially been supported by Rust. Windows 7+ was the originally supported target and Tier 3 XP support was added by Firefox, so this left a gap. </p>
<p>I did actually try adding an XP target awhile back. But I felt discouraged by conversations I had at the time.</p>



<a name="214495654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214495654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214495654">(Oct 25 2020 at 15:39)</a>:</h4>
<p>I'd be open to dropping what broken XP support we have right now. If anybody has the drive to make it happen again, they could work on adding it as an entirely separate target (<code>*-pc-windowsxp-*</code>?) in a more clean manner.</p>



<a name="214495706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214495706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214495706">(Oct 25 2020 at 15:40)</a>:</h4>
<p>It'd have to remain a T3 target though, I can't imagine T-infra being willing to spend time or resources on CIing the target.</p>



<a name="214495811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214495811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214495811">(Oct 25 2020 at 15:43)</a>:</h4>
<p>Here's a relevant issue from the release team too:<br>
<a href="https://github.com/rust-lang/release-team/issues/2">https://github.com/rust-lang/release-team/issues/2</a></p>



<a name="214495892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214495892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214495892">(Oct 25 2020 at 15:44)</a>:</h4>
<p>Even Windows 7 is problematic from a CI perspective</p>



<a name="214498829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214498829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214498829">(Oct 25 2020 at 16:45)</a>:</h4>
<p>If a new target is decided on I think it should be called <code>i686-xp-windows-msvc</code>. Here's my reasoning: According to <a href="https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3">the Forge</a> the targets that currently support XP are:</p>
<p>i686-pc-windows-msvc<br>
x86_64-pc-windows-msvc</p>
<p>64bit XP was very rare compared to 32bit (mostly some server editions) so in the interests of keeping new targets to the minimum (supporting XP is dicey enough already), I'd be minded to make only a 32bit target unless/until someone declares a need for 64bit. For UWP the 32bit MSVC target is <code>i686-uwp-windows-msvc</code>. So for XP it could be:</p>
<p>i686-xp-windows-msvc</p>



<a name="214502047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214502047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214502047">(Oct 25 2020 at 17:43)</a>:</h4>
<p>Btw, I've been trying to avoid being too explicit about my own opinion on what should happen because I'm interested in feeling out how others view the situation. But for the record, I too am in favour of dropping the broken XP support. If someone wants to step up to actively maintain an XP target then that's great. But otherwise I don't see an advantage to keeping it in its current state.</p>
<p>For those that do want to target XP they'll be no worse off without "official" support. The standard library is broken on XP anyway. And targetting <code>no_std</code> XP using existing Windows targets would still be possible so long as they have a linker and import libraries that support XP. Which is exactly the same as the situation today.</p>



<a name="214503624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214503624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214503624">(Oct 25 2020 at 18:10)</a>:</h4>
<p>Dropping XP sounds great.</p>



<a name="214503721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214503721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214503721">(Oct 25 2020 at 18:12)</a>:</h4>
<p>I've also talked to <span class="user-mention" data-user-id="224872">@Ryan Levick</span> about splitting Windows 10 from pre-10 as a target. 10 is evergreen, and we'd never have to worry about eternally-preserved compat hacks again. There are also some substantial improvements in Windows 10 with respect to cross-platform compatibility.</p>



<a name="214516541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214516541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214516541">(Oct 25 2020 at 22:33)</a>:</h4>
<p><code>pc</code> is a vendor field though. <code>uwp</code> being shoehorned into that field sounds like a weird choice and I'm not actually sure why it was done this way, nor do I see any discussion about it.</p>



<a name="214516545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214516545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214516545">(Oct 25 2020 at 22:33)</a>:</h4>
<p>but I'd rather this mistake is not propagated further, if possible.</p>



<a name="214516703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214516703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214516703">(Oct 25 2020 at 22:37)</a>:</h4>
<p>as far as code is concerned to cfg on uwp you need to use <code>cfg(target_vendor="uwp")</code> where its more like the "abi" I'd say?</p>



<a name="214516708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214516708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214516708">(Oct 25 2020 at 22:37)</a>:</h4>
<p>it'd be doubly weird to use <code>target_vendor="xp"</code> for xp target instead of using the already aptly named <code>target_os</code>.</p>



<a name="214516784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214516784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214516784">(Oct 25 2020 at 22:39)</a>:</h4>
<p>does the vendor field ever say anything useful in a target triple? It seems like dead weight</p>



<a name="214516853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214516853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214516853">(Oct 25 2020 at 22:40)</a>:</h4>
<p>although as I understand it this triple notation is inherited from gcc(?)</p>



<a name="214517214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214517214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214517214">(Oct 25 2020 at 22:49)</a>:</h4>
<p>its useful for mainframes, I guess?</p>



<a name="214518852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214518852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214518852">(Oct 25 2020 at 23:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/122651-general/topic/On.20WinXP.20support/near/214517214">said</a>:</p>
<blockquote>
<p>its useful for mainframes, I guess?</p>
</blockquote>
<p>Even then, I don't think there are many cases where systems differ <em>only</em> by "vendor" rather than by OS.</p>



<a name="214518892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214518892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214518892">(Oct 25 2020 at 23:28)</a>:</h4>
<p>There were lots of "UNIX vendors", but they each had their own UNIX.</p>



<a name="214519007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214519007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214519007">(Oct 25 2020 at 23:31)</a>:</h4>
<p>There are cases where the same vendor has multiple OSes, but in those cases, I don't know that much was predicated on the "vendor". sparc-sun-solaris and sparc-sun-sunos were very different, and I don't think there was much value in conditionals on the <code>sun</code> part of that.</p>



<a name="214519086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214519086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214519086">(Oct 25 2020 at 23:32)</a>:</h4>
<p>there's some value in target_vendor = "apple" currently</p>



<a name="214519219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214519219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214519219">(Oct 25 2020 at 23:35)</a>:</h4>
<p>Interesting. Things in common between macos and ios?</p>



<a name="214519946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214519946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214519946">(Oct 25 2020 at 23:52)</a>:</h4>
<p>Yep. Really it probably should be <code>any(target_os = "macos", target_os = "ios")</code>. Although, I guess you might want to throw <code>target_os = "tvos"</code> in there too... Using <code>target_vendor</code> captures all of these but... feels risky and overly broad since nothing prevents apple from releasing something without the <code>mach</code>/<code>darwin</code> legacy</p>



<a name="214523660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214523660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214523660">(Oct 26 2020 at 01:20)</a>:</h4>
<p>I'm not sure "pc" is a vendor though? It seems like a meaningless field that was filled in only because you have to put something? But my main issue with "windowsxp" as a name is that this will break existing code that expects the target OS to be "windows" for XP or does silly things like <code>contains("windows-msvc")</code>. Maybe breaking such code is a good thing but it's something to be aware of.</p>
<p>Either way I'm not wedded to any particular name and this is probably better litigated if/when an XP target is decided on.</p>



<a name="214567437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214567437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214567437">(Oct 26 2020 at 12:40)</a>:</h4>
<blockquote>
<p>Really it probably should be <code>any(target_os = "macos", target_os = "ios")</code>. Although, I guess you might want to throw <code>target_os = "tvos"</code> in there too...</p>
</blockquote>
<p>And <code>watchos</code>. However the latter two are different enough to not want to be grouped, IIRC.</p>



<a name="214567497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214567497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214567497">(Oct 26 2020 at 12:41)</a>:</h4>
<p>There are also people working on Win 9x and DOS support.</p>



<a name="214708979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214708979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214708979">(Oct 27 2020 at 14:43)</a>:</h4>
<p>Ok so if I want to tentatively start the process of dropping official XP support what are the first steps towards that? Is this uncharted territory? I mean, I'm not entirely clear on how these policy decisions are made.</p>



<a name="214711127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214711127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214711127">(Oct 27 2020 at 14:56)</a>:</h4>
<p>I think either an RFC or an FCP would be appropriate? I'm not sure which team handles targets, maybe T-lang?</p>



<a name="214711774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214711774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214711774">(Oct 27 2020 at 15:01)</a>:</h4>
<p>For the promotion of aarch64, it was jointly decided by T-compiler, T-infra, and T-release</p>



<a name="214727481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214727481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214727481">(Oct 27 2020 at 16:40)</a>:</h4>
<p>Hmm... after looking at the RFC template I think I can write something to fit the format. It might be a bit awkward or repetitive in places though. And I'm not even sure "Prior art" makes sense in this context?</p>



<a name="214727573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214727573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214727573">(Oct 27 2020 at 16:41)</a>:</h4>
<p><a href="https://rust-lang.github.io/rfcs/2837-demote-apple-32bit.html">https://rust-lang.github.io/rfcs/2837-demote-apple-32bit.html</a> feels pretty prior art</p>



<a name="214728320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214728320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214728320">(Oct 27 2020 at 16:46)</a>:</h4>
<p>Ah thanks. That's actually useful as a template too.</p>



<a name="214728418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214728418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214728418">(Oct 27 2020 at 16:47)</a>:</h4>
<p>Although this RFC will be keeping the target at Tier 1 while also removing it from Tier 3. Which is a bit weirder.</p>



<a name="214732979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214732979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214732979">(Oct 27 2020 at 17:18)</a>:</h4>
<p><span class="user-mention" data-user-id="260325">@Chris Denton</span> I would check out the target tier policy RFC, it’s not merged yet but it’s the best document for dropping a target at the moment. <a href="https://github.com/joshtriplett/rfcs/blob/target-tier-policy/text/0000-target-tier-policy.md">https://github.com/joshtriplett/rfcs/blob/target-tier-policy/text/0000-target-tier-policy.md</a></p>



<a name="214736530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214736530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214736530">(Oct 27 2020 at 17:40)</a>:</h4>
<p>Thanks. That is very useful for clarifying what Tier 3 means and for the Tier 2 bit on OS versions. But am I right in saying it doesn't mention much specifically about the process for dropping a Tier 3 target (or OS version, as in this case)? Or am I overlooking something?</p>



<a name="214737431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214737431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214737431">(Oct 27 2020 at 17:47)</a>:</h4>
<p><span class="user-mention" data-user-id="260325">@Chris Denton</span> </p>
<blockquote>
<p>If a tier 3 target stops meeting these requirements, or the target maintainers no longer have interest or time, or the target shows no signs of activity and has not built for some time, or removing the target would improve the quality of the Rust codebase, we may post a PR to remove it; any such PR will be CCed to the target maintainers (and potentially other people who have previously worked on the target), to check potential interest in improving the situation.</p>
</blockquote>



<a name="214738064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214738064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214738064">(Oct 27 2020 at 17:52)</a>:</h4>
<p><span class="user-mention" data-user-id="219696">@XAMPPRocky</span> Yeah, that was unclear to me who "we" is here. Is it saying I should post a PR? Or I should ask the team to? If I should post a PR then does that mean I simply need an edit to the forge platform support page? Or is it talking about some other type of PR? Sorry I'm a bit confused now.</p>



<a name="214738219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214738219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214738219">(Oct 27 2020 at 17:53)</a>:</h4>
<p>The PR is removing support in the rust-lang/rust repository. The forge is just reflective of that.</p>



<a name="214738420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214738420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214738420">(Oct 27 2020 at 17:55)</a>:</h4>
<p>But XP isn't a real target as such so there's nothing really to remove? I mean, there's the standard library which can be cleaned. But that's far too big a job to do in one go.</p>



<a name="214738702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214738702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214738702">(Oct 27 2020 at 17:57)</a>:</h4>
<p>Hmm, I see you mean.</p>



<a name="214739666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214739666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214739666">(Oct 27 2020 at 18:03)</a>:</h4>
<p><span class="user-mention" data-user-id="260325">@Chris Denton</span> Well I guess I’m confused on what you’re trying to achieve. I guess if you’re proposing a new target I would start with that.</p>



<a name="214740171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214740171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214740171">(Oct 27 2020 at 18:05)</a>:</h4>
<p>Currently <code>i686-pc-windows-msvc</code> and <code>x86_64-pc-windows-msvc</code> are Tier 1 and Tier 3 targets (Tier 1 for Windows 7+ and Tier 3 for Windows XP). I'm prosing dropping the Tier 3 support. I'm suggesting this reflects the current reality and avoids burdening a Tier 1 target with the concerns of a Tier 3 target.</p>



<a name="214740304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214740304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214740304">(Oct 27 2020 at 18:06)</a>:</h4>
<p>Does that make sense?</p>



<a name="214740334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214740334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214740334">(Oct 27 2020 at 18:06)</a>:</h4>
<p>Yes</p>



<a name="214740689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214740689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214740689">(Oct 27 2020 at 18:09)</a>:</h4>
<p>But dropping tier 3 support is just removing code, because tier 3 basically just means “some code is present in the repository”.</p>



<a name="214740940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214740940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214740940">(Oct 27 2020 at 18:10)</a>:</h4>
<p>Yes but the code is sprawled across the standard library in the form of workarounds, compatibility layer, etc. There needs to be some kind of policy decision before the work of cleaning this up can begin.</p>



<a name="214742091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214742091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214742091">(Oct 27 2020 at 18:19)</a>:</h4>
<p>I’m not sure I agree, speaking for myself, if you want to drop support there needs to be consensus on removing the <em>current</em> Windows XP support. I don’t think it requires that there’s a policy around Windows versions.</p>



<a name="214742242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214742242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214742242">(Oct 27 2020 at 18:20)</a>:</h4>
<p>That's what I'm trying to say (perhaps badly). There need to be a decision on XP support before removing XP support.</p>



<a name="214742458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214742458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214742458">(Oct 27 2020 at 18:22)</a>:</h4>
<p><span class="user-mention" data-user-id="260325">@Chris Denton</span> I would start with filing a Major Change Proposal with the compiler team. <a href="https://forge.rust-lang.org/compiler/mcp.html">https://forge.rust-lang.org/compiler/mcp.html</a></p>



<a name="214742504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214742504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214742504">(Oct 27 2020 at 18:22)</a>:</h4>
<p>Ah thanks. I'll take a look.</p>



<a name="214773816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214773816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214773816">(Oct 27 2020 at 22:41)</a>:</h4>
<p>Tagging <span class="user-mention" data-user-id="274471">@Arlie Davis</span> related to this thread on GitHub (<a href="https://github.com/rust-lang/rust/issues/78444#issuecomment-717578683">https://github.com/rust-lang/rust/issues/78444#issuecomment-717578683</a>) which would benefit from more fine grained control over Windows versions</p>



<a name="214774518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214774518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Arlie Davis <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214774518">(Oct 27 2020 at 22:49)</a>:</h4>
<p>Hello, all. Introductions: I'm a Windows developer, and I work with Ryan on our internal Rust v-team. I / we have been considering whether to propose creating new targets for variants of Windows. The current situation of a "one size fits all" is pretty unsatisfactory, in a lot of ways, and we think there's a lot of benefit to be gained by creating separate Rust targets.</p>



<a name="214774653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214774653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Arlie Davis <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214774653">(Oct 27 2020 at 22:51)</a>:</h4>
<p><span class="user-mention" data-user-id="260325">@Chris Denton</span> , if you're going to create an MCP for this, I'd like to help represent that, from the Windows / Microsoft side.</p>



<a name="214774724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214774724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214774724">(Oct 27 2020 at 22:51)</a>:</h4>
<p>See here for the MCP: <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Drop.20official.20support.20for.20Windows.20XP.20compiler-team.23378">https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Drop.20official.20support.20for.20Windows.20XP.20compiler-team.23378</a></p>



<a name="214804733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214804733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214804733">(Oct 28 2020 at 08:02)</a>:</h4>
<p>Yep sorry for not posting the link. This issues has been brought up a number of times over the years but discussions tend to fizzle out and nothing really gets decided, one way or the other. So any help in maintaining some forward momentum is appreciated.</p>



<a name="214834444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214834444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214834444">(Oct 28 2020 at 13:21)</a>:</h4>
<p>Probably makes sense to make sure that <a href="https://github.com/retep998">https://github.com/retep998</a> is included in the conversation. :-) Don't know their username here.</p>



<a name="214834588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214834588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214834588">(Oct 28 2020 at 13:22)</a>:</h4>
<p><span class="user-mention" data-user-id="125267">@Peter Rabbit</span> ping ^^</p>



<a name="214934636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/214934636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter Rabbit <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#214934636">(Oct 29 2020 at 07:51)</a>:</h4>
<p>My opinion is we need <code>target_os_version</code> as a cfg that people can &gt;= against. I don't want to be splitting off separate targets before we get <code>target_os_version</code>. I am not opposed to dropping XP support in the meantime however, although I hope we can regain XP support through <code>target_os_version</code> conditionals in the future so that people targeting newer Windows don't pay any compatibility penalty.</p>



<a name="215015801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215015801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215015801">(Oct 29 2020 at 19:24)</a>:</h4>
<p><span class="user-mention" data-user-id="125267">@Peter Rabbit</span> Interesting. You're proposing that both targets be <code>cpuname-pc-windows-{msvc,gnu}</code>, and differ only in <code>target_os_version</code> (and tier)?</p>



<a name="215016054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215016054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215016054">(Oct 29 2020 at 19:26)</a>:</h4>
<p>I know that FreeBSD wants a <code>target_os_version</code> concept as well.</p>



<a name="215016479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215016479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215016479">(Oct 29 2020 at 19:30)</a>:</h4>
<p>That sounds really appealing.</p>



<a name="215016914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215016914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215016914">(Oct 29 2020 at 19:33)</a>:</h4>
<p>It might want to be <code>target_min_os_version</code> or similar, since it represents the minimum version of the OS that the target supports.</p>



<a name="215045273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215045273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter Rabbit <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215045273">(Oct 30 2020 at 00:31)</a>:</h4>
<p>Yep. The idea is that the only thing you're allowed to do is ask EqualOrGreater comparisons like <code>target_os_version &gt;= 10.0.19041</code>, so that way code never has to be updated when a new target is added. If we make the minimum OS version part of the target itself then code will check that for equality and adding a new target like Vista is sort of a breaking change that requires any third party crates conditional on OS version to add support. With <code>target_os_version &gt;=</code> comparisons however everything using it would be automatically forward compatible. There's a reason Windows itself deprecated all ways of getting the Windows version other than <code>IsWindowsXXXOrGreater</code> APIs.</p>



<a name="215055780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215055780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215055780">(Oct 30 2020 at 04:20)</a>:</h4>
<p><span class="user-mention" data-user-id="125267">@Peter Rabbit</span> You should also be able to make "less than" comparisons since those are just the negation, but yeah.</p>



<a name="215055793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215055793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter Rabbit <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215055793">(Oct 30 2020 at 04:21)</a>:</h4>
<p>Well yes, <code>cfg(not(target_os_version &gt;= 10.0.19041))</code> should work just fine.</p>



<a name="215085754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215085754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215085754">(Oct 30 2020 at 12:12)</a>:</h4>
<p>This is kind of half-implemented already.<br>
We have <a href="https://github.com/rust-lang/rust/issues/64796"><code>#[cfg(version("1.2.3"))]</code></a> and it can be extended to work with <code>target_os_version</code> as well, and to support semver-like modifiers in the version string (<code>#[cfg(target_os_version("&gt;=10.0.19041"))]</code>).</p>



<a name="215086261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215086261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215086261">(Oct 30 2020 at 12:17)</a>:</h4>
<p>Heh, looks like <code>cfg(version("&gt;=1.2.3"))</code> is already supported syntactically just because the compiler uses the <code>semver</code> library and doesn't bother to validate the input by itself.</p>



<a name="215086343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215086343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215086343">(Oct 30 2020 at 12:18)</a>:</h4>
<p>Need to check what <code>&gt;=</code> changes semantically there, most likely nothing.</p>



<a name="215086352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215086352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215086352">(Oct 30 2020 at 12:18)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=1a823eb01d0700f63ce224752c40a1bb">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=1a823eb01d0700f63ce224752c40a1bb</a></p>



<a name="215189552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215189552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215189552">(Oct 31 2020 at 12:31)</a>:</h4>
<p>Are Windows versions subject to semver though? We might want to just assume lexicographic ordering and nothing else</p>



<a name="215189605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215189605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215189605">(Oct 31 2020 at 12:33)</a>:</h4>
<p>also the version number mapping needs to be carefully documented... AFAIK Windows 7 and 8 internally have version number 6 for compatibility, or so?</p>



<a name="215189681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215189681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215189681">(Oct 31 2020 at 12:34)</a>:</h4>
<p><a href="https://en.wikipedia.org/wiki/Windows_NT">https://en.wikipedia.org/wiki/Windows_NT</a> has a list of all NT based windows versions and their internal version number.</p>



<a name="215189936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215189936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215189936">(Oct 31 2020 at 12:41)</a>:</h4>
<p>"internal numbers" and such like aren't particularly useful tbh. It's either a compatibility thing or more for internal use. For the programmer the API version is what matters. So <code>7.0</code>, <code>7.1</code>,  <code>10.0.19041</code>, etc.</p>



<a name="215190119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215190119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215190119">(Oct 31 2020 at 12:46)</a>:</h4>
<p>For reference, Visual Studio has two relevant settings:</p>
<ul>
<li>"Windows SDK Version": the API version to use.</li>
<li>"Platform Toolset":  The version of the build tools to use (compiler/linker/etc).</li>
</ul>



<a name="215190221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215190221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215190221">(Oct 31 2020 at 12:48)</a>:</h4>
<p>Setting the platform toolset can be useful when building but shouldn't be of much interest to the code itself.</p>



<a name="215191733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215191733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter Rabbit <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215191733">(Oct 31 2020 at 13:26)</a>:</h4>
<p>While it does not respect semver in terms of when breaking changes can occur, it absolutely follows the same <em>ordering</em>. Also I don't know what <code>7.0</code> you're talking about. Windows 7 is in fact version <code>6.1.7600</code> while Windows 7 Service Pack 1 is <code>6.1.7601</code>. We don't need to hardcode these version numbers as ordering is consistent, at least within the Windows NT line. DOS Windows follows a separate line of versions which should have a completely distinct target, but is also consistent within itself.</p>



<a name="215191959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215191959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215191959">(Oct 31 2020 at 13:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125267">Peter Rabbit</span> <a href="#narrow/stream/122651-general/topic/On.20WinXP.20support/near/215191733">said</a>:</p>
<blockquote>
<p>Also I don't know what <code>7.0</code> you're talking about.</p>
</blockquote>
<p>I was talking about SDK versions. I mean the thing you link against on the official MSVC toolchain. For example, Windows 7 service pack 1 (i.e. the latest version of Windows 7) is <code>7.1</code>.</p>



<a name="215192722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215192722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter Rabbit <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215192722">(Oct 31 2020 at 13:50)</a>:</h4>
<p>Windows SDK versions don't matter as much to Rust as we aren't dependent on the headers from the Windows SDK, and if we had <code>raw-dylib</code> we'd also be independent of their import libraries. The target OS version is what Rust developers care about and determines what APIs the developer can assume exist, and crates like <code>winapi</code> can use it to determine which library to link against for a specific function (downlevel vs win10 for example).</p>



<a name="215192744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215192744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215192744">(Oct 31 2020 at 13:51)</a>:</h4>
<p>That's what the SDK version is about though. Which APIs exist.</p>



<a name="215193518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215193518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter Rabbit <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215193518">(Oct 31 2020 at 14:10)</a>:</h4>
<p>Not really? Which version of Windows you're targeting is kind of independent of which version of the Windows SDK you're using, and it's so much easier to just talk about the Windows version you're targeting and not having to involve the version number of an SDK that Rust might not even actually use.</p>



<a name="215193602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215193602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter Rabbit <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215193602">(Oct 31 2020 at 14:13)</a>:</h4>
<p>And your code may choose to target a lower Windows version while still taking advantage of features of newer Windows versions <em>when available</em>. The SDK provides an <em>upper</em> bound on which API features are available at all, while what we care about is the <em>lower</em> bound on which APIs are guaranteed to be available on the target system.</p>



<a name="215194187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215194187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215194187">(Oct 31 2020 at 14:29)</a>:</h4>
<p>But I mean seeing Windows version "6.1.7601" is not particularly obvious what that's referring to. You have to remember that means Windows 7 and not Vista or XP or whatever.  Whereas with "7.1" the major version at least matches the name of the Windows version it's talking about.</p>



<a name="215194547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/On%20WinXP%20support/near/215194547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter Rabbit <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/On.20WinXP.20support.html#215194547">(Oct 31 2020 at 14:39)</a>:</h4>
<p>We can certainly choose to add friendlier aliases. However many Windows versions do not have a friendly version number, and it gets awkward when you include Windows server versions. However the NT version is a good monotonic version that Microsoft has used consistently and is also consistent with the <code>WIN32_WINNT</code> constants that developers use.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>